package com.atguigu.edu.mapper;

public interface TrafficStatsMapper {
    @Select("select
            "source_name
            ",sum(uv_count)"
            "from dws_traffic_vc_sc_ar_is_new_page_view_window
            "partition par#{date}
            "group by source_name
            "order by uv_count desc
            "limit #{limit}")
            List<TrafficUvct> selectScUvCt(@Param("date") Integer date,@Param("limit") Integer limit);

    @Select("select keyword,\n" +
            "       sum(keyword_count) keyword_count\n" +
            "    from dws_traffic_source_keyword_page_view_window partition par#{date}\n" +
            "group by keyword order by keyword_count desc limit 20;")
    List<TrafficKeyWords> selectKeyWordCt(@Param("date") Integer date);

}
